package com.aaa.hospital.controller;

import com.aaa.hospital.pojo.query.NewsAgreeQuery;
import com.aaa.hospital.pojo.vo.NewsVO;
import com.aaa.hospital.result.AjaxResult;
import com.aaa.hospital.service.NewsAgreeService;
import lombok.Data;
import org.aspectj.weaver.loadtime.Aj;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @program:qy888
 * @description:www
 * @author:LJW
 * @version: 1.0
 * @create:2022-02-23 08:31
 */
@RestController
@RequestMapping("agree")
public class NewsAgreeController {

    @Autowired
    private NewsAgreeService newsAgreeService;


    @RequestMapping("query")
    public AjaxResult query(NewsAgreeQuery newsAgreeQuery){
        return newsAgreeService.queryNewsAgree(newsAgreeQuery);
    }

    @RequestMapping("get/{id}")
    public AjaxResult get(@PathVariable("id") Integer id){
        return newsAgreeService.get(id);
    }

    @RequestMapping("pass/{id}")
    public AjaxResult pass(@PathVariable("id") Integer id){
        return newsAgreeService.pass(id);
    }

    @RequestMapping("refuse")
    public AjaxResult refuse(NewsVO newsVO){
        return newsAgreeService.refuse(newsVO);
    }

}
